
#ifndef  __MESSAGE_H__
#define  __MESSAGE_H__

#include "debug.h"
#include "include_com.h"


#define  MAX_MSG_SIZE_4K           (1*1024*1024)

typedef struct _msg_box_t {

	unsigned int msg_cmd;

    unsigned int msg_data0;
    unsigned int msg_data1;

} msg_box_t;

typedef struct _msg_packet_t {

	msg_box_t    msg_box[MAX_MSG_SIZE_4K];

    unsigned int msg_rindex;
    unsigned int msg_windex;

} msg_packet_t;


enum {

	MSG_KEY_UNKNOWN   = 0,
		
    MSG_KEY_UP        = 1, 
    MSG_KEY_DOWN      = 2, 
    MSG_KEY_RIGHT     = 3,  
    MSG_KEY_LEFT      = 4,  
    MSG_KEY_ESC       = 5, 
    
    MSG_KEY_DEL       = 6, 
    MSG_KEY_BACKSPACE = 7,   
    MSG_KEY_ENTER     = 8,  
    MSG_KEY_NEXT      = 9,   
    MSG_KEY_PREV      = 10,  
    
    MSG_KEY_HOME      = 11,   
    MSG_KEY_END       = 12,  
    MSG_KEY_POWER     = 13,
	MSG_KEY_TV        = 14,
	MSG_KEY_USB_SD    = 15,
	
	MSG_KEY_MUSIC     = 16,
	MSG_KEY_MOVIE     = 17,
	MSG_KEY_PHOTO     = 18,
	MSG_KEY_OSD       = 19,
	MSG_KEY_SETUP     = 20,
	
	MSG_KEY_BACK      = 21,
	MSG_KEY_FAST      = 22,
	MSG_KEY_VOL_DOWN  = 23,
	MSG_KEY_VOL_UP    = 24,
	MSG_KEY_REPEAT    = 25,
	
	MSG_KEY_NP        = 26,
	MSG_KEY_MUTE      = 27,
	MSG_KEY_0		  = 28,
	MSG_KEY_1         = 29,
	MSG_KEY_2         = 30,
	
	MSG_KEY_3         = 31,
	MSG_KEY_4         = 32,
	MSG_KEY_5         = 33,
	MSG_KEY_6         = 34,
	MSG_KEY_7         = 35,
	
	MSG_KEY_8         = 36,
	MSG_KEY_9         = 37,
	MSG_KEY_10        = 38,
	MSG_KEY_PLAY      = 39,
	MSG_KEY_PAUSE     = 40,
	
	MSG_KEY_STOP        = 41,
	MSG_KEY_NUM         = 42,
	MSG_KEY_STANDBY	    = 43,
	MSG_KEY_PLAY_PAUSE	= 44,
	MSG_KEY_RE_PLAY   	= 45,
	
	MSG_KEY_MENU		= 46,
	MSG_KEY_MODE		= 47,
	MSG_KEY_RETURN		= 48,
	MSG_KEY_LONGLEFT	= 48,
	MSG_KEY_LONGRIGHT	= 50,
	
	MSG_KEY_LONGLEFTUP	= 51,
	MSG_KEY_LONGRIGHTUP	= 52,
	
};




#endif

